package com.ruoyi.lzxt.user.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Sensitive;
import com.ruoyi.common.enums.SensitiveStrategy;
import com.ruoyi.common.xss.Xss;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 公司账号实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "Org_Struct")
public class Employee implements Serializable {
    private static final long serialVersionUID = 6176952379123664735L;
    /*
     * 用户guid
     * */
    @Xss(message = "用户账号不能包含脚本字符")
    @TableId(value = "User_GUID",type = IdType.ASSIGN_UUID)
    private String UserGUID;
    /**
     * 用户id 员工账号
     */
    @Xss(message = "用户账号不能包含脚本字符")
    @NotBlank(message = "用户账号不能为空")
    @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
    @TableField(value = "User_Id")
    private String UserId;

    /**
     * OaUserId
     */
    @Xss(message = "用户OA账号不能包含脚本字符")
    @Size(min = 0, max = 30, message = "用户OA账号长度不能超过30个字符")
    @TableField(value = "OaUserId")
    private String OaUserId;
    /**
     * 全名
     */
    @Xss(message = "用户全名不能包含脚本字符")
    @Size(min = 0, max = 30, message = "用户全名长度不能超过30个字符")
    @TableField(value = "FullName")
    private String FullName;

    /**
     * 专业部门
     */
    @Xss(message = "用户专业部门不能包含脚本字符")
    @Size(min = 0, max = 30, message = "用户专业部门长度不能超过30个字符")
    @TableField(value = "ClassName")
    private String ClassName;
    /**
     * 员工部门
     */

    @TableField(value = "DepartmentName")
    private String DepartmentName;
    /**
     * 是否被禁用
     */
    @TableField(value = "IsForbidden")
    private String IsForbidden;
    /**
     * 一级管理员
     */
    @TableField(value = "IsManger1")
    private String IsManger1;
    /**
     * 二级管理员
     */
    @TableField(value = "IsManger2")
    private String IsManger2;
    /**
     * 三级管理员
     */
    @TableField(value = "IsManger3")
    private String IsManger3;
    /**
     * 所在公司职务名称
     */
    @TableField(value = "JobPostName")
    private String JobPostName;
    /**
     * 其他
     */
    @TableField(value = "Other")
    private String Other;
    /**
     * 备注
     */

    @TableField(value = "Remarks")
//    @NotBlank(message = "Remarks不能为空")
//    @Size(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式错误")
    @Sensitive(strategy = SensitiveStrategy.PHONE)
    @Size(min = 11, max = 11, message = "手机号只能为11位")
    private String Remarks;
    /**
     * 专业职称
     */
    @TableField(value = "para1")
    private String para1;
    /**
     * 职务等级
     */
    @TableField(value = "para2")
    private String para2;
    /**
     * 密码
     */
    @TableField(value = "para3")
    private String para3;
    /**
     * 专业属性
     */
    @TableField(value = "para4")
    private String para4;
    /**
     *para5
     */
    @TableField(value = "para5")
    private String para5;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "modify_data")
    private LocalDateTime modify_data;

}
